<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
  <title>The BNF Converter</title>
  <link rel="stylesheet" type="text/css" href="default.css">
</head>
<body bgcolor="#ffffff" text="#000000">
<center>
<h1>BNF Converter<br>
</h1>
<a href="http://www.cs.chalmers.se/%7Emarkus">Markus Forsberg</a> and <a
 href="http://www.cs.chalmers.se/%7Eaarne">Aarne Ranta</a>
<br>
&nbsp; March 2005 </center>
<hr>
<h2>News</h2>
<ul>
  <li>BNF Converter is now part of the stable distribution of Debian. <a
 href="http://packages.debian.org/stable/devel/bnfc">Link</a><br>
  </li>
  <li>23/03 2005 Release of <span style="font-weight: bold;">BNF
Converter</span> <span style="font-weight: bold;">v.2.2</span>. New
features are: Java 1.5 support, XML generation, Generalized LR for
Happy and a GF-to-BNFC translation support. </li>
</ul>
<h2>What is the BNF Converter?</h2>
<p>The BNF Converter is a compiler construction tool generating a
compiler
front-end
from a <b>Labelled BNF grammar</b>. It was originally written to
generate Haskell, but starting from Version 2.0, it can also be used
for generating Java, C++, and C.
</p>
<p> Given a <b>Labelled BNF grammar</b> the tool produces: </p>
<ul>
  <li> an abstract syntax as a Haskell/C++/C module or Java
directory</li>
  <li>a case skeleton for the abstract syntax in the same language</li>
  <li> an <a href="http://www.haskell.org/alex"> Alex</a>, <a
 href="http://www.cs.princeton.edu/%7Eappel/modern/java/JLex/">JLex</a>,
or <a href="http://www.gnu.org/software/flex/flex.html">Flex</a> lexer
generator file </li>
  <li> a <a href="http://www.haskell.org/happy">Happy</a>, <a
 href="http://www.cs.princeton.edu/%7Eappel/modern/java/CUP/">CUP</a>,
or <a href="http://www.gnu.org/software/bison/bison.html">Bison</a>
parser generator file</li>
  <li> a pretty-printer as a Haskell/Java/C++/C module </li>
  <li> a Latex file containing a readable specification of the
language </li>
</ul>
<h2>User manuals</h2>
<ul>
  <li> Report on the LBNF formalism: 
<a href="LBNF-report.pdf"> LBNF-report.pdf</a>
<a href="LBNF-report.ps.gz"> LBNF-report.ps.gz</a>
</li>
  <li><a href="http://www.cs.chalmers.se/%7Emarkus/tech2004.pdf">Technical
Report</a><br>
  </li>
  <li><a href="quick.html">Quick Start</a> </li>
  <li><a href="BNF_Converter_Haskell_Mode.html">Haskell Mode</a></li>
  <li><a href="glr-bnfc.html">Haskell GLR Mode</a><br>
  </li>
  <li><a href="BNF_Converter_Java_Mode.html">Java 1.4 Mode</a></li>
  <li><a href="BNF_Converter_Java1_5_Mode.html">Java 1.5 Mode</a><br>
  </li>
  <li><a href="BNF_Converter_C_Mode.html">C Mode</a></li>
  <li><a href="BNF_Converter_CPP_Mode.html">C++ Mode</a></li>
  <li><a href="BNF_Converter_CSharp_Mode.html">C# Mode</a></li>
  <li><a href="BNFC_XML.html">XML Mode</a></li>
</ul>
<h2>Downloads</h2>
<p>Source code: <a href="BNFC_2.2.tgz">BNFC_2.2.tgz</a> </p>
<p> Report on the LBNF formalism:
 <a href="LBNF-report.pdf"> LBNF-report.pdf</a> 
<a href="LBNF-report.ps.gz"> LBNF-report.ps.gz</a> </p>
<h2>Example grammars</h2>
<p>A <a href="examples/C.cf">grammar of C</a>. An <a
 href="examples/runtime.c">example C file</a> parsable in type <tt>Program</tt>.
</p>
<p>A <a href="examples/Alfa.cf">grammar of Alfa</a>
(For more details, see the <a
 href="http://www.cs.chalmers.se/%7Ehallgren/Alfa">Alfa home page</a>.)
</p>
<p>A <a href="examples/LBNF.cf">grammar of LBNF</a>. It is at the
same
time an example LBNF file, parsable in type <tt>Grammar</tt>. This
grammar is used in the implementation of the BNF Converter.<br>
<br>
A <a href="http://people.cs.uchicago.edu/%7Emrainey/java.cf">grammar
of Java 1.1</a> developed by <a
 href="http://people.cs.uchicago.edu/%7Emrainey/">Mike Rainey</a> </p>
<h2>Earlier versions</h2>
<p>v2.1 source code with examples: <a href="bnfc_2.1.tgz">
bnfc_2.1.tgz</a> </p>
<p>v2.0 source code with examples: <a href="bnfc_2.0.tgz">
bnfc_2.0.tgz</a> </p>
<p> v1.3 source code with examples: <a href="bnfc_1.2.tar">
bnfc_1.3.tar</a> </p>
<!--
<p> v1.2 source code with examples:  <a href="bnfc_1.2.tar">
 bnfc_1.2.tar</a>
</p>
<p> v1.2 Linux binary:  <a href="bnfc_1.2_linux.zip">
 bnfc_1.2_linux.zip</a>
</p>
<p>v1.2 Windows binary:  <a href="bnfc_1.2_win.zip">
 bnfc_1.2_win.zip</a>
</p>
<p>v1.2 Solaris binary:  <a href="bnfc_1.2_solaris.zip">
 bnfc_1.2_solaris.zip</a>
</p>
<p>Previous BNF Converter report:  <a href="BNFConv.ps">
 BNFConv.ps</a>
</p>
<p> v1.1, source code with examples:  <a href="bnfc_1.1.tar">
 bnfc_1.1.tar</a>
  </p>
-->
<p> v1.0, source code with examples: <a href="bnf-conv.tgz">
bnf_conv.tgz<br>
</a></p>
<h2>Authors</h2>
<p>Bj&ouml;rn Bringert, Paul Callaghan,
Markus Forsberg, Peter Gammie, Patrik Jansson, Antti-Juhani Kaijanaho,
Michael Pellauer, and Aarne Ranta.</p>
</body>
</html>
